/**
 * TriggerMethod.java
 * Version: 1.0
 * Created in 06/08/2013
 * Created by: Gerson Groth
 * 
 * Copyright
 */
package activities.base.tcx;

/**
 * The Enum TriggerMethod.
 * 
 * @author Gerson Groth
 */
public enum TriggerMethod {

	/** The manual. */
	MANUAL(
			"Manual");

	/** The method. */
	private String method;

	/**
	 * Instantiates a new trigger method.
	 * 
	 * @param method
	 *            the method
	 */
	TriggerMethod(String method) {
		this.method = method;
	}

	/**
	 * Gets the method.
	 * 
	 * @return the method
	 */
	public String getMethod() {
		return this.method;
	}

	/**
	 * Gets the method.
	 * 
	 * @param name
	 *            the name
	 * @return the method
	 */
	public static TriggerMethod getMethod(String name) {
		for (TriggerMethod trigger : TriggerMethod.values()) {
			if (trigger.getMethod().equals(name))
				return trigger;
		}
		return null;
	}
}
